const { qiniuUpload } = require('../lib/utils'),
        config = require('../config/config')
class Admin {
    async testQiniu() {
        const qiniu = config.qiniu;
        try {
            const imgData = await qiniuUpload({
                url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605181531778&di=2b7524580da440cdabd494d411e456be&imgtype=0&src=http%3A%2F%2Fmedia-cdn.tripadvisor.com%2Fmedia%2Fphoto-s%2F01%2F3e%2F05%2F40%2Fthe-sandbar-that-links.jpg',
                bucket: qiniu.bucket.blogsimg.bucket_name,
                ak: qiniu.keys.ak,
                sk: qiniu.keys.sk,
                ext: '.jpg'
            })
           
        } catch (error) {
            console.log(error)
        }
    }
}      
module.exports = new Admin();